/*
 * @Author: guo wei
 * @LastEditors: [guo wei]
 * @LastEditTime: 2024-01-21 21:05:12
 * @Description: 
 */
import request from '@/utils/request'

// 查询三级材料列表
export function getMaterialInfos(query) {
  return request({
    url: '/materialInfos',
    method: 'get',
    params: query
  })
}
// 查询三级材料下拉框列表
export function getMaterialSelectInfos(query) {
  return request({
    url: '/materialInfo/selectList',
    method: 'get',
    params: query
  })
}
export const getPublicFileUrl = (query) => {
  return request({
    url: '/getPublicFileUrl',
    method: 'get', 
    params: query
  })
}
export const getMaterialCategoryInfo = (query) => {
  return request({
    url: '/materialCategoryInfo/getSelectData',
    method: 'get', 
    params: query
  })
}
// 新增三级材料
export function addMaterialInfo(data) {
  return request({
    url: `/materialInfo`,
    method: 'post',
    data
  })
}
// 修改三级材料
export function modifyMaterialInfo(data) {
  return request({
    url: `/materialInfo`,
    method: 'put',
    data
  })
}
// 删除材料分类
export function deleteMaterialInfo(data) {
  return request({
    url: `/materialInfo/${data.materialInfoId}`,
    method: 'delete',
       params:{recordVersion:data.recordVersion}
  })
}
// 查询三级材料
export function getMaterialInfo(query) {
  return request({
    url: `/materialInfo/${query}`,
    method: 'get',
  })
}